package model

import (
	"gorm.io/gorm"
)

type GoodsInfo struct {
	gorm.Model
	Title    string     `json:"title" gorm:"connment:商品名称; type:varchar(255)"`
	Price    float32    `json:"price" gorm:"comment:商品价格"`
	Num      int        `json:"num" gorm:"comment:库存数"`
	Image    string     `json:"pic_url" gorm:"comment:图片; type:varchar(255)"`
	Cid      string     `json:"cid" gorm:"comment:所属类目"`
	Category []Category `gorm:"foreignKey:ParentId"`
	//PicUri     string  `json:"pic_url" gorm:"comment:图片; type:varchar(255)"`
	//Name       string  `json:"name" gorm:"connment:商品名称; type:varchar(255)"`
	//Price      float64 `json:"price" gorm:"comment:商品价格"`
	//Level      int     `json:"level" gorm:"comment:分类级别"`
	//Brand      string  `json:"brand" gorm:"comment:品牌"`
	//Stock      int     `json:"stock" gorm:"comment:stock:库存"` // 这里的库存要和数据中的goods_optopms_info中的库存一致
	//Sale       int     `json:"sale" gorm:"comment:销量"`
	//Tags       string  `json:"tags" gorm:"comment:标签"`
	//DetailInfo string  `json:"detail_info" gorm:"comment:商品详情; type:varchar(255)"`
}
